package com.example.rydwlib

import com.example.baselib.BaseRepository
import com.example.baselib.databean.ResponseData
import huaan.com.mvvmdemo.http.RetrofitClient
import retrofit2.Response

/**
 * Author: sxygsj
 * Date: 2020/5/6 10:35
 * Description: 人员定位
 * History:
 * <author> <time> <version> <desc>
 * 作者姓名 修改时间 版本号 描述
 */
class RydwRepository :BaseRepository(){
    suspend fun loadRyMainData(token:String,unitcode:String):Response<ResponseData<String>> = request {
        RetrofitClient.reqApi().loadRyMainData(token,unitcode)
    }
    suspend fun loadRyRegionData(token:String,unitcode:String):Response<ResponseData<String>> = request {
        RetrofitClient.reqApi().loadRyRegionData(token,unitcode)
    }

    suspend fun loadRyAlarmData(token: String, unitcode: String):Response<ResponseData<String>> = request {
        RetrofitClient.reqApi().loadRyAlarmData(token,unitcode)
    }

    suspend fun loadRyPersonData(type: String,token: String, unitcode: String):Response<ResponseData<String>>  = request {
        RetrofitClient.reqApi().loadRyPersonData(type,token,unitcode)
    }

    suspend fun loadRyReportChart(token: String, unitcode: String):Response<ResponseData<String>> = request {
        RetrofitClient.reqApi().loadRyReportChart(token,unitcode)
    }
    suspend fun loadRydwNickData(token: String)=request {
        RetrofitClient.reqApi().loadRydwNickData(token)
    }
}